#import <GraphicsServices/GraphicsServices.h>
#import <UIKit/UIApplication.h>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

@class UIWindow;
@class UIView;
@class UITransitionView;
@class UINavigationBar;
@class PreferencesView;
@class MouseView;

@interface Application : UIApplication 
{
	UIWindow *window;
	
	UITransitionView *mainView;
	
	PreferencesView *prefsView;
	MouseView *view;
	
	int sock;
	struct sockaddr_in addr;
}

+ (void)initialize;

- (void)dealloc;

- (void)applicationDidFinishLaunching: (id)unused;

- (void)acceleratedInX: (float)x Y: (float)y  Z: (float)z;

// mouse view delegate
- (void)mouseMoveAbsolute: (CGPoint)p;
- (void)mouseMoveRelative: (CGPoint)d;
- (void)mouseLeftButtonClick;
- (void)mouseRightButtonClick;
- (void)mouseWheel: (int)rev;

// navigation bar delegate
- (void)navigationBar: (UINavigationBar *)navigationBar buttonClicked: (int)button;

// status bar event
- (void)statusBarMouseDown: (GSEventRef)event;
/*
- (void)statusBarMouseUp: (GSEventRef)event;
- (void)statusBarMouseDragged: (GSEventRef)event;
*/
@end
